﻿@{
    ViewBag.Title = "错误提示配置表单页";
    Layout = "~/Views/Shared/_Form.cshtml";
}

<form id="form1">
    <div style="padding-top: 20px; margin-right: 30px;">
        <table class="form">
            <tr>
                <th class="formTitle"><span class="required">*</span>编码：</th>
                <td class="formValue">
                    <input id="code" name="code" type="text" class="form-control required" />
                </td>
            </tr>
            <tr>
                <th class="formTitle"><span class="required">*</span>消息：</th>
                <td class="formValue">
                    <input id="msg" name="msg" type="text" class="form-control required" />
                </td>
            </tr>
        </table>
    </div>
</form>

<script>
    var keyValue = $.request("keyValue");
    $(function () {
        initControl();
        if (!!keyValue) {
            $.ajax({
                url: "/SystemManage/SysFailedCodeMessageMapp/GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                success: function (data) {
                    $("#form1").formSerialize(data);
                }
            });
        }
    });

    function initControl() {

    }

    function AcceptClick(callBack) {
        if (!$('#form1').formValid()) {
            return false;
        }
        var postData = $("#form1").formSerialize();

        $.submitForm({
            url: "/SystemManage/SysFailedCodeMessageMapp/SubmitForm?keyValue=" + keyValue,
            param: postData,
            success: function () {
                callBack();
                $.modalClose();
            }
        });
    }
</script>
